package com.yycx.module.weixin.provider.config;

import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import org.springframework.boot.context.properties.ConfigurationProperties;

import java.util.List;

/**
 * @author <a href="https://github.com/007gzs">007</a>
 */
@ConfigurationProperties(prefix = "wx.open")
@Data
public class WxOpenProperties {

    private List<WxOpenConfig> wxOpenConfigs;

    public static class WxOpenConfig {
        /**
         * 设置微信三方平台的appid
         */
        private String componentAppId;

        /**
         * 设置微信三方平台的app secret
         */
        private String componentSecret;

        /**
         * 设置微信三方平台的token
         */
        private String componentToken;

        /**
         * 设置微信三方平台的EncodingAESKey
         */
        private String componentAesKey;

        public String getComponentAppId() {
            return componentAppId;
        }

        public void setComponentAppId(String componentAppId) {
            this.componentAppId = componentAppId;
        }

        public String getComponentSecret() {
            return componentSecret;
        }

        public void setComponentSecret(String componentSecret) {
            this.componentSecret = componentSecret;
        }

        public String getComponentToken() {
            return componentToken;
        }

        public void setComponentToken(String componentToken) {
            this.componentToken = componentToken;
        }

        public String getComponentAesKey() {
            return componentAesKey;
        }

        public void setComponentAesKey(String componentAesKey) {
            this.componentAesKey = componentAesKey;
        }

        @Override
        public String toString() {
            return ToStringBuilder.reflectionToString(this,
                    ToStringStyle.MULTI_LINE_STYLE);
        }
    }

}
